<!--
/**************************************************
* @(#)checkManufacture.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/02/08, SimonyiPeng
*  1) first release
/**************************************************
-->

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.hitrust.gs.business.GSManufactureProcessor"%>
<%@ page import="com.hitrust.gs.bean.GSManufactureBean"%>
<%@ include file="../../common.jsp" %>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>


<%
boolean isManufactureExist = false;
GSManufactureBean bean = null;
String rowNum = request.getParameter("rownum");
String manufactureId = request.getParameter("manufactureid");
System.out.println("XXX:"+manufactureId);
GSManufactureProcessor processor = new GSManufactureProcessor ();
ArrayList ary = processor.getManufactureForOrderInput(manufactureId);
if(ary.size()==0){
%>

<html>
<head>
<title>机构信息</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/css.css" type=text/css rel=stylesheet>


</head>

<body   BGCOLOR=#f2f2f2 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
<p><br></p>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black">产品信息录入提示</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>

<br>

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
        <td> 
            <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
                <tbody> 
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">没有查到您想要的产品！</div>
						<br>
						<div align="center" class="txt_content">是否录入该产品信息？</div>
                    </td>
                </tr>
                </tbody> 
            </table>
        </td>
    </tr>
</table>

<center>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td width=100% align=middle>
			<input type="button" value="确定" width="58" height="24" class="kuang" onclick="alert('请在订单录入界面点击 导入 按钮新增产品');window.close();">
			<input type="button" value="取消" width="58" height="24" class="kuang" onclick="window.close();">
		</td>
	<tr>
</table>
</center>

</body>
</html>

<%	
}
else{
%>

<html>
<head>
<title>机构信息</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/css.css" type=text/css rel=stylesheet>

</head>

<body   BGCOLOR=#f2f2f2 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 >
<p><br></p>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="1" class="mtxt_black">&nbsp;</td>
          <td height="30" width="758" class="mtxt_black">产品信息选择提示</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>

<br>

    <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    	<input type='hidden' id='currentrownum' name='currentrownum' value='1'>
        <tr> 
            <td> 
                <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                    	<td align=middle colspan="11">订单产品选择</td>
	                </tr>
	                
	                <tr class="bg_column" height=20> 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品编号</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品名称</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品种类编号</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品品牌</div>
                        </td>
                    </tr>

<%
	for(int i=0;i<ary.size();i++){
		bean = (GSManufactureBean)ary.get(i);
		String buffer = bean.getGs_manufacture_id()+"|"+bean.getGs_manufacture_name()+"|"+bean.getGs_quant_unit()+"|"+bean.getGs_manufacture_unitprice();
%>
                    <tr class="bg_column" height=20 > 

                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type="radio" name="index" value="<%=buffer%>">
                            </div>
                        </td>
                        <!--产品编号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                				&nbsp;<%=bean.getGs_manufacture_id()%>
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
                            	&nbsp;<%=bean.getGs_manufacture_name()%>
							</div>
                        </td>
                        <!--产品种类编号-->
                        <td class=top align=middle nowrap id='linkman1'> 
                            <div align='center' class='txt_content'> 
                            	&nbsp;<%=bean.getGs_manufacture_category_id()%>
                            </div>
                        </td>
                        <!--产品品牌-->
                        <td class=top align=middle nowrap id='linktel1'> 
                            <div align='center' class='txt_content'> 
                            	&nbsp;<%=bean.getGs_manufacture_brand()%>
                            </div>
                        </td>
                    </tr>

<%
}
%>

                    </tbody> 
                </table>
            </td>
        </tr>
    </table>

<center>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td width=100% align=middle>
			<input type="button" value="确定" width="58" height="24" class="kuang" onclick="confirm()">
			<input type="button" value="取消" width="58" height="24" class="kuang" onclick="window.close();return false;">
		</td>
	<tr>
</table>
</center>

<script language='javascript'>	

	function confirm(){
	
		var ary = tokenize(document.all.index.value,"|");
		var returnv = new Array();
		returnv[0] = '<%=rowNum%>';
		returnv[1] = ary[0];
		returnv[2] = ary[1];
		returnv[3] = ary[2];
		returnv[4] = ary[3];
		window.returnValue=returnv;
		window.close();
	
	}
</script>

</body>
</html>

<%
}
%>